#pragma once
/*#include "Stdafx.h"
#include "comparators.h"
#include "data.h"
#include "DebugUtils.h"
#include "handletables.h"
#include "hooks.h"
#include "jassvmhooks.h"
#include "myjassvm.h"
#include "Pascal.h"
#include "pool.h"
#include "wc3_game_state.h"
#include "wc3_native_signature_parser.h"
#include "wc3agent.h"
#include "wc3collections.h"
#include "wc3float.h"
#include "wc3game.h"
#include "wc3jassvm.h"
#include "wc3main.h"
#include "wc3memory.h"
#include "wc3nettag.h"
#include "wc3observer.h"
#include "wc3player.h"
#include "wc3props.h"
#include "wc3refcnt.h"
#include "wc3string.h"
#include "wc3stringhash.h"*/
#include "Stdafx.h"
#include "Pascal.h"
#include "wc3main.h"
#include "wc3collections.h"
#include "wc3agent.h"
#include "wc3_game_state.h"
#include "wc3player.h"
#include "wc3jassvm.h"
#include "wc3memory.h"
#include "wc3string.h"
#include "wc3props.h"
#include "wc3refcnt.h"
#include "wc3observer.h"
#include "jassvmhooks.h"
#include "myjassvm.h"
#include "debug_logger.h"
#include "jassvm_extension.h"
HMODULE GameDll = 0;
typedef procedure THandlerCallback;
THandlerCallbacks * InitHandlers;
THandlerCallbacks * InitDoneHandlers;
PAgileData* ppAgileData;
Pointer p_TStringManager_VMT;
PRCString p_TRCString_VMT;
PStringManager* ppStringManager;
PStringRep pNullRep;
PRefCnt_VMT p_TRefCnt_VMT;

	_RegisterNative_1 _RegisterNative;
	_Compile_1 _Compile;
	_FreeScript_1 _FreeScript;
	_CreateInstance_1 _CreateInstance;
	_RegisterInstance_1 _RegisterInstance;
	_FreeInstance_1 _FreeInstance;
	_RunInstance_1 _RunInstance;
	_CloneInstance_1 _CloneInstance;
	_Instance_Run_1 _Instance_Run;
	_Instance_CallCode_1 _Instance_CallCode;
	_Instance_ExecuteFunctionWithOptionalInit_1 _Instance_ExecuteFunctionWithOptionalInit;
	_ExecuteFunctionByHandle_1 _ExecuteFunctionByHandle;
	_Instance_GetStringHandle_1 _Instance_GetStringHandle;

	Pointer JassArray_VMT;

const wchar_t STORM_NAME_1[] = L"storm.dll";
SStrHash64_1 SStrHash64;
SStrHash32_1 SStrHash32;
_CObserver_Unsubscribe_1 _CObserver_Unsubscribe;
_GetWc3Prop_1 _GetWc3Prop;
const wchar_t STORM_NAME[] = L"storm.dll";
SMemAlloc_1 SMemAlloc;
SMemFree_1 SMemFree;
SMemReAlloc_1 SMemReAlloc;

	TInstanceEventCallback pOnInstanceCreated;
	TInstanceEventCallback pOnInstanceDestroying;
	TInstanceEventCallback pOnInstanceInit;
	TInstanceExecuteFunctionByNameCallback pOnExecuteFunctionByName;
	TInstanceExecuteFunctionByHandleCallback pOnExecuteFunctionByHandle;
	TInstanceGetStringHandleCallback pOnInstanceGetStringHandle;
	TEnableVarChangeEventCallback pOnEnableVarChangeEvent;

	orig_RegisterInstance_1 orig_RegisterInstance;
	orig_FreeInstance_1 orig_FreeInstance;
	orig_Instance_ExecuteFunctionWithOptionalInit_1 orig_Instance_ExecuteFunctionWithOptionalInit;
	orig_ExecuteFunctionByHandle_1 orig_ExecuteFunctionByHandle;
	orig_Instance_GetStringHandle_1 orig_Instance_GetStringHandle;
	orig_CGameState_ConnectToVarChangeEvent_1 orig_CGameState_ConnectToVarChangeEvent;

	TEnvironmentData JassEnvironment;



	PJumpTable _pJumpTable;
	TJumpTable JumpTableCopy;

	orig_Compile_1 orig_Compile;

	TLogger Logger("C:\Games\JassAccelerator (ñ++)");

	//TStringList Blacklist;
	TFunctionTables FunctionTables;
	Integer IgnoreLevel = 0;

	//TAnsiStringBuilderHack StringBuilder;

	TInstanceToScriptTable InstanceToScriptTable;
	TScriptToFuncTable ScriptToFuncTable;